14f1701a09fd2fdd754bbcb96446836c57db24f2,driver/src/test/java/org/neo4j/driver/internal/cluster/RediscoveryTest.java,IllegalResponseTest,shouldProtocolErrorWhenUnparsableRecord,#,281
Before Change
when( mockedConnections.acquire( A ) ).thenReturn( healthyConn );
ClusterComposition.Provider mockedProvider = mock( ClusterComposition.Provider.class );
ProtocolException exception = new ProtocolException( "Unparsable record received" );
when( mockedProvider.getClusterComposition( healthyConn ) )
.thenThrow( exception );
// When & When
try
{
ClusterComposition clusterComposition = rediscover( mockedConnections, routingTable, mockedProvider );
fail( "Expecting a failure but not triggered." );
}
catch( Exception e )
After Change
when( mockedConnections.acquire( A ) ).thenReturn( healthyConn );
ClusterCompositionProvider mockedProvider = mock( ClusterCompositionProvider.class );
ProtocolException exception = new ProtocolException( "Failed to parse result" );
when( mockedProvider.getClusterComposition( healthyConn ) ).thenReturn( Failure( exception ) );
// When & When
try
{
rediscover( mockedConnections, routingTable, mockedProvider );
fail( "Expecting a failure but not triggered." );
}
catch ( Exception e )